# 第1题解答
def count_characters(s):
    s_letters = 0
    s_digits = 0
    s_others = 0
    for char in s:
        if char.isalpha():
            s_letters += 1
        elif char.isdigit():
            s_digits += 1
        else:
            s_others += 1
    return s_letters, s_digits, s_others


st = input('请输入一个字符串:')
letters,digits,others = count_characters(st)
print(f'letters = {letters},digits = {digits},others = {others}')